SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwrCausasAltas
AS
SELECT     idCausaAlta AS ID, Descripcion, Mnemo
FROM         dbo.tb_CausasAltas
WHERE    ((Select Modo FROM vw_UsuarioModo) = 1) OR ((Select Modo FROM vw_UsuarioModo) = 2) AND (IdCausaAlta NOT IN (7, 8, 14, 19))




GO
GRANT SELECT ON  [dbo].[vwrCausasAltas] TO [CentroDeDesignaciones]
GRANT SELECT ON  [dbo].[vwrCausasAltas] TO [CertificacionesServicios]
GRANT SELECT ON  [dbo].[vwrCausasAltas] TO [public]
GRANT SELECT ON  [dbo].[vwrCausasAltas] TO [SoloVer]
GO
